<?php
/**
 * Description:
 * Author: hezhizheng
 * Date: 2018/11/14
 * Time: 17:08
 * Created by Created by Panxsoft.
 */

namespace App\Models\Options;

use App\Models\Products\ProductOption;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;

/**
 * 选项描述（多语言）
 *
 * @property string $name
 *
 * @mixin Builder
 */
class OptionDescription extends Model
{
    protected $guarded = [];

    protected $table = 'option_description';
    protected $primaryKey = 'option_id';

    public function productOption()
    {
        return $this->belongsTo(ProductOption::class, 'option_id', 'option_id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function option()
    {
        return $this->belongsTo(Option::class, 'option_id', 'option_id');
    }

}